import React, { Component } from 'react'
import Qcevents1 from "../utils/events1.js"//
 class Left extends Component {
   state = {

    activeiNDEX:0
   }
  fnsend(ind) {
      console.log(ind)
      this.setState({
        activeiNDEX:ind
      })
      Qcevents1.emit("activeIndex",ind)
  }
  render() {
    return (
      <div className='left'>
        {
          this.props.send&&this.props.send.length?this.props.send.map((item,index)=>{
            return <h4 key={index} onClick={this.fnsend.bind(this,index)} className={this.state.activeiNDEX===index ?"active":""} >{item.tit}</h4>
          }):"暂无数据"
        }


      </div>
    )
  }
}

export default Left